<?php 
namespace Home\Controller;
use Hdphp\Library\Controller;
/**
 * 默认控制器
 */
class IndexController extends CommonController{
	/**
	 * 默认方法
	 */
	public function index(){
		//读取顶级分类
		$this->topNav();

		//待 解决问题
		$sql="SELECT * FROM hd_ask WHERE solve = 0 ORDER BY RAND() LIMIT 4 ";
		$askData=M()->query($sql);
		$this->assign('askData',$askData);
		//悬赏
		$sql="SELECT * FROM hd_ask WHERE solve=0 AND reward>=20 ORDER BY RAND() LIMIT 4 ";
		$reward=M()->query($sql);
		$this->assign('reward',$reward);

		//问答右部统计信息
		$this->rightInfo();

		$this->display();
	}
}






